Logical Functions

You can find definitions for logical functions such as and, if, ifnull, and or.

Function Description
and Returns 1 only if all contained expressions evaluate to non-zero. Returns 0 otherwise.
if Evaluates the expression.
ifnull Evaluates the expression and executes the second argument if true.
or Returns 1 if any of the contained expressions evaluate to non-zero. Returns 0 otherwise.